<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"

      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body th:fragment="aside">
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <div class="user-panel">

        </div>
        <!-- search form -->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search...">
                <span class="input-group-btn">
                    <button type="submit" name="search" id="search-btn" class="btn btn-flat">
                      <i class="fa fa-search"></i>
                    </button>
                  </span>
            </div>
        </form>

        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="treeview " shiro:hasPermission="订单管理">
                <a href="#">
                    <i class="fa fa-file-text-o"></i> <span>订单管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a th:href="@{/order/findOrder}"><i class="fa fa-circle-o"></i> 订单列表</a></li>
                </ul>
            </li>

            <li class="treeview "shiro:hasPermission="用户管理">
                <a href="#">
                    <i class="fa fa-user "></i> <span>用户管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a th:href="@{/user/findUser}"><i class="fa fa-circle-o"></i> 用户信息管理</a></li>
                </ul>
            </li>

            <li class="treeview " shiro:hasPermission="城市信息管理">
                <a href="#">
                    <i class="fa fa-user"></i> <span>城市信息管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" >
                    <li><a th:href="@{/city/hotelCount}"><i class="fa fa-circle-o"></i>城市酒店数量</a></li>
                    <li><a th:href="@{/toHotel}"><i class="fa fa-circle-o"></i>每个城市的各类酒店</a></li>
                </ul>
            </li>
            <li class="treeview " shiro:hasPermission="酒店信息管理">
                <a href="#">
                    <i class="fa  fa-hotel "></i> <span>酒店信息管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a th:href="@{/hotel/findAllHotel}"><i class="fa fa-circle-o"></i>所有的酒店信息</a></li>
                    <li><a th:href="@{/toAddHotel}"><i class="fa fa-circle-o"></i>添加酒店信息</a></li>
                    <li><a th:href="@{/toHotelRoom}"><i class="fa fa-circle-o"></i>酒店房间信息</a></li>
                </ul>
            </li>
            <li class="treeview " shiro:hasPermission="历史订单">
                <a href="#">
                    <i class="fa  fa-hotel "></i> <span>历史订单</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a th:href="@{/order/hisOrder}"><i class="fa fa-circle-o"></i>历史订单信息</a></li>
                </ul>
            </li>
            <li class="treeview " shiro:hasPermission="权限管理">
                <a href="#">
                    <i class="fa fa-user-md "></i> <span>权限管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a th:href="@{/permission/findRolePermission}"><i class="fa fa-circle-o"></i>分配权限</a></li>
                </ul>
            </li>
            <li class="treeview " shiro:hasPermission="角色管理">
                <a href="#">
                    <i class="fa fa-user-md "></i> <span>角色管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a th:href="@{/manager/findAllManager}"><i class="fa fa-circle-o"></i>角色分配</a></li>
                </ul>
            </li>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>
</body>
<script>

    $(function () {
        $('.treeview').click(function () {
            $(this).append().addClass("active");
        })

    })


</script>
</html>